home *** CD-ROM | disk | FTP | other *** search
/ Your Choice 1 / your choice.zip / your choice / OS2 / AM4PM / RECORD.AMC < prev    next >
Text File  |  1993-07-12  |  1KB  |  41 lines

  1. /*********************************************************************/
  2. /* RECORD.AMC - Do a recording of a message                          */
  3. /*                                                                   *//* This program is called by AM4PM.EXE.                              */
  4. /*                                                                   *//* Input:  arg(1) Name of the file to record                         */
  5. /*                                                                   *//* Output: 0  Normal. Only AT+VLS=0 is done before waiting           */
  6. /*         1  Full init. Reinit COM-port and everything.             */
  7. /*         2  Terminate AM4PM.                                       */
  8. /*                                                                   *//*********************************************************************/
  9. CALL AMDPrint 'RECORD.AMC('arg(1)') started'
  10. CALL AMSetLastEventText 'Record'
  11.  
  12. AMSendW('AT+VTS=[800,0,12]')
  13.  
  14. CALL AMSetStateText 'Recording message' arg(1)
  15.  
  16. AMSendW('AT+VLS=8')     /* 2 = telco line, 8 = external mic */
  17.  
  18. CrntMFile=AMOpenRecFile()
  19.  
  20. CALL AMStartRec(1) /* 1 = CELP, 2 = ADPCM2, 3 = ADPCM3 */
  21.  
  22. DLECode=AMWaitDLECode()
  23.  
  24. CALL AMEndRec
  25. CALL AMCloseRecFile
  26.  
  27. select
  28. when DLECode='!' then
  29.    do
  30.       'del' CrntMFile
  31.    end
  32. otherwise
  33.    do
  34.       'copy' CrntMFile arg(1)
  35.       'del' CrntMFile
  36.    end
  37. end
  38.  
  39.  
  40. Exit 0
  41.